#include <stdio.h>
#include <stdlib.h>

struct Student_type{
    char name[10];
    int num;
    int age;
    char adds[15];
} stud[10];

int main() {
    int i;
    FILE * fp;
    if ((fp = fopen("D:\\C\\stu.txt", "rb")) == NULL) {
        printf("cannot open file\n");
        exit(0);
    }
    for (i = 0; i < 10; i += 2) {
        fseek(fp, i * sizeof(Student_type), 0);
        fread (&stud[i], sizeof(Student_type), 1, fp);
        printf("%-10s %4d %4d %-15s\n", stud[i].name, stud[i].num, stud[i].age, stud[i].adds);
    }
    fclose(fp);
    return 0;
}